using Assets.SimpleAndroidNotifications;
using System;
using UnityEngine;

public class PushNotification : MonoBehaviour
{
	private void OnApplicationPause(bool pauseStatus)
	{
		if (pauseStatus)
		{
			CancelNoti();
			SendNoti("Hey Boss...", "We don't feel so good...", 259200, NotificationIcon.Return);
			SendNoti("It's been a long day, isn't it?", "How about relax while watching over us?", 86400, NotificationIcon.Message);
			SendNoti("Our Coin storage is full now.", "Would you kindly start the game and collect it?", 36000, NotificationIcon.Coin);
		}
		else
		{
			CancelNoti();
		}
	}

	private void OnApplicationQuit()
	{
		CancelNoti();
		SendNoti("Hey Boss...", "We don't feel so good...", 259200, NotificationIcon.Return);
		SendNoti("It's been a long day, isn't it?", "How about relax while watching over us?", 86400, NotificationIcon.Message);
		SendNoti("Our Coin storage is full now.", "Would you kindly start the game and collect it?", 36000, NotificationIcon.Coin);
	}

	public void SendNoti(string title, string message, int seconds, NotificationIcon icon)
	{
		NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(seconds), title, message, new Color(0f, 0.6f, 1f), icon);
	}

	private void CancelNoti()
	{
		NotificationManager.CancelAll();
	}

	private void CancelDisplay()
	{
		NotificationManager.CancelAllDisplayed();
	}
}
